const $areaCodeList = $(".area-code-list");
const $areaCodeNew = $(".area-code-new");

$areaCodeNew.on("click", function() {
    if($areaCodeList.css("display") === "none") {
        $areaCodeList.css("display", "block");
        $areaCodeNew.removeClass("login_fold").addClass("login_show");
    } else {
        $areaCodeList.css("display", "none");
        $areaCodeNew.removeClass("login_show").addClass("login_fold");
    }
});

$areaCodeList.on("click", "dd", function() {
    const selectCode = $(this).find("span").text();
    $areaCodeNew.html(selectCode);
    $areaCodeList.css("display", "none");
})